/**
 * @param {string} s
 * @return {boolean}
 */
 var checkString = function(s) {
  let i = -1, j = -1
  for(let k = 0; k<s.length; k++){
    if(s[k] === 'b'){
      j = k
      break
    }
  }
  for(let k = 0; k<s.length; k++){
    if(s[k] === 'a') i = k
  }
  if(i === -1 || j === -1) return true
  return i < j
};